<div class="row">
  <div class="col-lg-6 col-md-10 col-lg-push-3 col-md-push-1">
    <div class="one-form-header" style="text-align: center;color: #999;">
      <div>注：根据所选的数据类型生成数据类型（日、周、月、年）数据</div>
      <div style="width: 392px;margin: 0 auto;">数据类型选择：生成日数据选择天数、生成周数据选择每周的周日、生成月数据选择月份、生成年数据选择某年的任意月份，日期框中只会显示年份</div>
    </div>
    <div class="one-form-body" style="width: 383px;margin: 0 auto;">
      <div class="form-group">
        <label style="width: 150px;text-align: right;">数据类型：</label>
        <nz-select style="width: 228px;" [(ngModel)]="factorType" nzSize="large">
          <nz-option nzLabel="--请选择数据类型--" nzValue=""></nz-option>
          <nz-option
            *ngFor="let dataType of dataTypeArr"
            [nzLabel]="dataType.display"
            [nzValue]="dataType.value"
          >
          </nz-option>
        </nz-select>
      </div>
      <div class="form-group">
        <label style="width: 150px;text-align: right;">生成数据类型：</label>
        <nz-select style="width: 228px;" [(ngModel)]="timeDataType" nzSize="large" nzAllowClear (nzOpenChange) = 'timeTypeChange($event)'>
          <nz-option nzLabel="--请选择数据类型--" nzValue=""></nz-option>
          <nz-option
            *ngFor="let timeData of timeDataArr"
            [nzLabel]="timeData.name"
            [nzValue]="timeData.dataType"
          >
          </nz-option>
        </nz-select>
      </div>
      <div class="form-group">
        <label style="width: 150px;text-align: right;"><span *ngIf="timeDataType === 'dayData'">开始</span>时间：</label>
        <!--(ngModelChange)="_startDate=$event;_startValueChange()" [ngModel]="_startDate" [nzDisabledDate]="_disabledStartDate" nzShowTime [nzFormat]="'YYYY-MM-DD HH:mm:ss'" [nzPlaceHolder]="'Start date'"-->
        <nz-datepicker
          style="width: 228px;" nzSize="large"
          (ngModelChange)="startDate=$event"
          [ngModel]="startDate"
          [nzDisabledDate]="disabledStartDate"
          [nzShowTime] = 'false'
          [nzFormat]='timeFormatter'
          [nzMode] = 'timeMode'
          [nzPlaceHolder]="'时间'"></nz-datepicker>
      </div>
      <div class="form-group" *ngIf="timeDataType === 'dayData'">
        <label style="width: 150px;text-align: right;">结束时间：</label>
        <!--(ngModelChange)="_startDate=$event;_startValueChange()" [ngModel]="_startDate" [nzDisabledDate]="_disabledStartDate" nzShowTime [nzFormat]="'YYYY-MM-DD HH:mm:ss'" [nzPlaceHolder]="'Start date'"-->
        <nz-datepicker
          style="width: 228px;" nzSize="large"
          (ngModelChange)="endDate=$event"
          [ngModel]="endDate"
          [nzDisabledDate]="disabledEndDate"
          [nzShowTime] = 'false'
          [nzFormat]='timeFormatter'
          [nzMode] = 'timeMode'
          [nzPlaceHolder]="'时间'"></nz-datepicker>
      </div>
    </div>
    <div class="one-form-footer" style="width: 383px;margin: 0 auto;">
      <div class="pull-right">
        <button class="btn btn-success" (click)="getDataGenerated()" [disabled]="isLoading">
          <span *ngIf="!isLoading">生成{{timeDataName}}数据</span>
          <span *ngIf="isLoading">{{timeDataName}}数据生成中...</span>
        </button>
      </div>
    </div>
  </div>
</div>
